﻿Imports DotNetXmlHttpRequest

Module Module1

    Sub Main()
        Dim ajax As New XMLHttpRequest


        ' Teste com GET
        ajax.Open(XMLHttpRequest.EnumMethod.GET, "http://site.ycaro.net/teste.php?teste=123")
        ajax.Send()
        If ajax.readystate = 4 Then
            If ajax.Status = 200 Then
                Console.WriteLine("Teste1: " & ajax.responseText)
            End If
        End If
        ajax.Dispose()


        ' Teste com POST
        ajax = New XMLHttpRequest
        ajax.Open(XMLHttpRequest.EnumMethod.POST, "http://site.ycaro.net/teste.php")
        ajax.Send("teste=123")
        If ajax.readystate = 4 Then
            If ajax.Status = 200 Then
                Console.WriteLine("Teste2: " & ajax.responseText)
            End If
        End If
        ajax.Dispose()


        Console.ReadLine()
    End Sub

End Module
